package org.jsbd.boss.dao.impl;

import java.util.ArrayList;
import java.util.List;

import org.apache.commons.lang.StringUtils;
import org.jsbd.boss.dao.IIssueStatisticsDAO;
import org.jsbd.boss.domian.channel.IssueBaseStatistics;
import org.jsbd.boss.domian.channel.IssueBaseStatisticsVo;
import org.jsbd.boss.domian.channel.IssueLoginStatistics;
import org.jsbd.boss.domian.channel.IssueLoginStatisticsVo;
import org.jsbd.boss.domian.channel.IssueStatistics;
import org.jsbd.boss.domian.channel.IssueStatisticsVo;
import org.springframework.stereotype.Repository;

@Repository("issueStatisticsDao")
public class IssueStatisticsDAOImpl extends CrackStatisticsBaseDao implements IIssueStatisticsDAO {

	@Override
	public List<IssueStatistics> selectRecords(IssueStatisticsVo issueStatisticsVo) {
		return super.queryForList("qy_issue_statistics.SELECT_ALL", issueStatisticsVo);
	}

	@Override
	public List<String> selectMinute(IssueStatisticsVo issueStatisticsVo) {
		return super.queryForList("qy_issue_statistics.SELECT_MINUTE_ALL", issueStatisticsVo);
	}

	@Override
	public List<IssueLoginStatistics> selectLoginRecords(IssueLoginStatisticsVo issueLoginStatisticsVo) {
		return super.queryForList("qy_issue_statistics.SELECT_LOGIN_ALL", issueLoginStatisticsVo);
	}
	
	@Override
	public List<String> selectLoginMinute(IssueLoginStatisticsVo issueLoginStatisticsVo) {
		return super.queryForList("qy_issue_statistics.SELECT_LOGIN_MINUTE_ALL", issueLoginStatisticsVo);
	}

	@Override
	public List<IssueBaseStatistics> selectBaseRecords(IssueBaseStatisticsVo issueBaseStatisticsVo) {
		return super.queryForList("qy_issue_statistics.SELECT_BASE_ALL", issueBaseStatisticsVo);
//		int base = issueBaseStatisticsVo.getBase();
//		if (base == -1) {
//			return super.queryForList("qy_issue_statistics.SELECT_BASE_ALL", issueBaseStatisticsVo);
//		} else {
//			return super.queryForList("qy_issue_statistics.SELECT_BASE_LIST", issueBaseStatisticsVo);
//		}
	}
	
	@Override
	public List<String> selectBaseDays(IssueBaseStatisticsVo issueBaseStatisticsVo) {
		return super.queryForList("qy_issue_statistics.SELECT_BASE_DAYS_ALL", issueBaseStatisticsVo);
//		int base = issueBaseStatisticsVo.getBase();
//		if (base == -1) {
//			return super.queryForList("qy_issue_statistics.SELECT_BASE_DAYS_ALL", issueBaseStatisticsVo);
//		} else {
//			return super.queryForList("qy_issue_statistics.SELECT_BASE_DAYS_LIST", issueBaseStatisticsVo);
//		}
	}
}
